package com.autism.day01;

//计算-10.8  --  5.9之间，绝对值大于6 或小于2.1的整数
public class Demo {

    public static void main(String[] args) {

        double min = -10.8;
        double max = 5.9;
        int count = 0;

        for (int i = (int) min; i < max; i++) {
            int abs = Math.abs(i);

            if (abs > 6 || abs < 2.1) {
                System.out.println(i);
                count++;
            }
        }
        System.out.println("满足要求的整数个数：" + count);
    }
}
